<template>
	<view>
		<list-comp :list="recommendList.data" @lower="lower"></list-comp>
	</view>
</template>

<script>
	import listComp from './components/listComp.vue'
	import { recommend } from '@/api/share'
	export default {
		components: {
			listComp
		},
		onLoad() {
			this.getRecommendList()
		},
		data() {
			return {
				recommendList: [],
				page: 1,
				pageSize: 10
			}
		},
		methods: {
			lower() {
				this.page+=1
				this.getRecommendList()
			},
			getRecommendList() {
				let that = this
				recommend({
					page: that.page,
					pageSize: that.pageSize
				}).then(res => {
					if(res.data.status == 200) {
						that.recommendList = res.data.data.list
					}
				})
			},
		}
	}
</script>

<style>

</style>
